Skip to content

hw/arm: add Radxa ROCK 5B+ and split RK3588 board models#15

Merged
zevorn merged 24 commits into
develfrom
agent/rock-5b-plus
Jul 19, 2026
Merged

hw/arm: add Radxa ROCK 5B+ and split RK3588 board models#15
zevorn merged 24 commits into
develfrom
agent/rock-5b-plus

Conversation

@zevorn

@zevorn zevorn commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add a standalone rock-5b-plus machine for the Radxa ROCK 5B+
  • split the RK3588 EVB, ROC-RK3588S-PC, and ROCK 5B+ board definitions into separate machine sources
  • move firmware-visible RK3588 peripheral register behavior into independent devices under the relevant hw/* subsystems
  • support both direct Linux boot and the complete DDR/TPL, SPL, verified FIT, ATF, U-Boot, extlinux, and Linux boot path
  • add isolated board configurations, qtests, functional Linux boot tests, documentation, and MAINTAINERS coverage

Motivation

The existing downstream RK3588 implementation combined multiple board definitions and some firmware-facing peripheral state in one machine source. That made board-specific behavior difficult to extend without coupling the EVB and ROC-PC machines together.

ROCK 5B+ also needs its own Radxa SDK contract, including LPDDR5 identification, eMMC boot policy, the board PCIe 3x2 topology, secure OTP behavior, Rockchip crypto-v2 hashing, and dynamic FIT handoff into the vendor U-Boot stack.

This series keeps shared SoC construction in the abstract RK3588 machine while giving every concrete board and every modeled peripheral a separate source boundary.

Boot coverage

The rock-5b-plus machine supports:

  1. QEMU direct boot with a Radxa SDK Linux Image and initramfs.
  2. Firmware boot from eMMC through Rockchip DDR/TPL, U-Boot SPL, five verified FIT components, Arm Trusted Firmware, U-Boot proper, extlinux, and Linux.

Both functional tests enter an interactive BusyBox shell and verify the SDK kernel release with uname -r.

Pinned functional assets are published at:

https://github.com/processmission/qemu/releases/tag/rock-5b-plus-rsdk-b2-qemu1

Validation

  • ninja -C build-armvirt qemu-system-aarch64 tests/qtest/rock5b-plus-test tests/qtest/rk3588-evb-test tests/qtest/rk3588s-roc-pc-test
  • RK3588 board qtests: 16/16 subtests passed
  • ROCK 5B+ direct and firmware Linux functional tests: 2/2 passed
  • git diff --check origin/devel..HEAD
  • scripts/checkpatch.pl origin/devel..HEAD: 0 errors
  • all 20 commits contain exactly one Signed-off-by: Chao Liu <[email protected]> trailer

This is a downstream board model and is not intended as an upstream QEMU submission.

zevorn added 20 commits July 18, 2026 21:41
Keep the RK3588 machine state and SoC implementation private while
allowing board implementations in separate translation units to inherit
the common machine.

Make board-specific DRAM type, GMAC presence and PCIe lane count
declarative. The existing EVB and ROC-PC values remain unchanged.

Signed-off-by: Chao Liu <[email protected]>
Register ROCK 5B+ as an independent board implementation that inherits
the common RK3588 machine. Describe the Radxa board as LPDDR5 with eMMC
firmware boot, PCIe x2 and no SoC DWMAC instances.

Add a dedicated qtest covering one-CPU and eight-CPU configurations and
the board-specific memory, interrupt, storage and firmware contracts.

Signed-off-by: Chao Liu <[email protected]>
Model the deferred single-descriptor SHA-256 DMA flow used by the Radxa SDK SPL to authenticate external-data FIT images. Reject unsupported restart and chained descriptor flows, and expose the polling status and digest register contract through RegisterInfo.

Instantiate the device only for the ROCK 5B+ firmware profile and cover digest, write-mask, W1C, reset and invalid-flow behavior with the standalone board qtest.

Signed-off-by: Chao Liu <[email protected]>
Replace the machine-local firmware MMIO callbacks and GRF state with independent SysBus devices. Extend the DDR model with the vendor firmware windows needed by the ROCK 5B+ TPL, and queue the FIT handoff on the vCPU to avoid resetting a running CPU from timer context.

Signed-off-by: Chao Liu <[email protected]>
Parameterize the RK3588 PCIe FDT description and emit the second PCIe host only for ROCK 5B+. Add a qtest that validates its registers, interrupts, resets, bus range, MSI mapping, and outbound ranges.

Signed-off-by: Chao Liu <[email protected]>
Provide one minimal device configuration for each concrete RK3588 machine so downstream builds can include a single board without pulling in its siblings. Add the split board and device sources to MAINTAINERS.

Signed-off-by: Chao Liu <[email protected]>
List ROCK 5B+ alongside the EVB and ROC-PC machines, describe the independent peripheral boundaries, and provide verified direct-Linux and complete Radxa SDK firmware boot examples.

Signed-off-by: Chao Liu <[email protected]>
The RK3588 machine uses its board-defined heterogeneous CPU topology and does not apply a global -cpu override. Remove the misleading Cortex-A76 option from both ROCK 5B+ boot examples.

Signed-off-by: Chao Liu <[email protected]>
Add pinned Radxa rsdk-b2 assets and exercise both direct kernel loading and the complete DDR/TPL, SPL, verified FIT, ATF, U-Boot, extlinux, and Linux path. Require both boots to reach an interactive BusyBox shell and report the expected SDK kernel release.

Signed-off-by: Chao Liu <[email protected]>
@zevorn
zevorn marked this pull request as ready for review July 18, 2026 13:49

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0579bc601b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread hw/arm/rk3588.c
zevorn added 4 commits July 18, 2026 21:55
Make the DesignWare root bus report its configured bus-nr so iATU
configuration accesses can reach the root port. Keep DBI accesses working
for non-zero root bus numbers and cover the ROCK 5B+ bus 0x10 path with
qtest.

Signed-off-by: Chao Liu <[email protected]>
@zevorn

zevorn commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: a4512d7cd9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@zevorn
zevorn merged commit 237a069 into devel Jul 19, 2026
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant